package com.ly.mp.component.entities;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class ProcParaEntity implements Serializable {
    private static final long serialVersionUID = -5566512648881060666L;
    private Map<String, Object> inRef;
    private Map<String, Object> outRef;

    public Map<String, Object> getInRef() {
        return this.inRef;
    }

    private void setInRef(String strName, String strVal) {
        if (this.inRef == null) {
            this.inRef = new HashMap();
        }

        if (!this.inRef.containsKey(strName)) {
            this.inRef.put(strName, strVal);
        }

    }

    public Map<String, Object> getOutRef() {
        return this.outRef;
    }

    private void setOutRef(String strName, String strVal) {
        if (this.outRef == null) {
            this.outRef = new HashMap();
        }

        if (!this.outRef.containsKey(strName)) {
            this.outRef.put(strName, strVal);
        }

    }

    public void setRef(String strName, String strVal, String strType) {
        if ("in".equals(strType.toLowerCase().trim())) {
            this.setInRef(strName.replaceAll("\n", ""), strVal);
        } else if ("out".equals(strType.toLowerCase().trim())) {
            this.setOutRef(strName.replaceAll("\n", ""), strVal);
        }

    }
}